﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text;
using Amazon.DynamoDBv2;
using Amazon.DynamoDBv2.Model;

namespace AmazonDynamoDBStub.Helpers
{
    public static class ExceptionHelper
    {
        public static void ThrowAmazonDynamoDBException()
        {
            throw typeof(AmazonDynamoDBException).InvokeMember("AmazonDynamoDBException", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.CreateInstance,
                null, null, new object[] { new WebException() }) as AmazonDynamoDBException;
        }

        public static void ThrowResourceNotFoundException()
        {
            throw typeof(ResourceNotFoundException).InvokeMember("ResourceNotFoundException", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.CreateInstance,
                null, null, new object[] { new WebException() }) as ResourceNotFoundException;
        }
    }
}
